const handleTime = require('./formatTime')


module.exports.saveUserSession = (saveResult) => {
    return {
        nick_name: saveResult.nick_name,
        email: saveResult.email,
        identity: saveResult.identity,
        date: handleTime.base_format(saveResult.date),
        loginNum: saveResult.loginNum,
        sign: saveResult.sign,
        website: saveResult.website,
        avatar: saveResult.avatar,
        _id: saveResult._id
    }
}



module.exports.genRule = (saveResult) => {
    return { id: saveResult._id, nick_name: saveResult.nick_name, email: saveResult.email }
}